# include color table
source myconfig/colortable
case "${TERM}" in
	xterm*) TERM=xterm-256color
			PS1="\[${FGGRN}\][\[${BFGCYN}\]\u\[${FGRED}\]@\[${BFGCYN}\]\h:\[${BFGPUR}\]\W\[${FGGRN}\]]\[${FGRED}\]\\$ \[${NORMAL}\]"
			;;
		 *) PS1="\[${FGGRN}\][\[${FGCYN}\]\u\[${FGRED}\]@\[${FGCYN}\]\h:\[${FGPUR}\]\W\[${FGGRN}\]]\[${FGRED}\]\\$ \[${NORMAL}\]"
			;;
esac
#PS1="\[\033[38;5;10m\][\[$(tput sgr0)\]\[\033[38;5;14m\]\u\[$(tput sgr0)\]\[\033[38;5;196m\]@\[$(tput sgr0)\]\[\033[38;5;14m\]\h\[$(tput sgr0)\]\[\033[38;5;10m\]:\[$(tput sgr0)\]\[\033[38;5;13m\]\W\[$(tput sgr0)\]\[\033[38;5;10m\]]\[$(tput sgr0)\]\[\033[38;5;196m\]\\$\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"

alias mysql='mysql -u root -p123456'
alias cwd='cd /var/www/CodeIgniter/application/'

alias ..='cd ..'
alias ...='cd ../../'
alias vi='vim'
alias wget='wget -c'
alias cls='reset'
alias grep='grep --color=auto'
#ls
alias ls='ls --color=auto'
alias ll='ls -Alh --color=auto'
alias la='ls -A --color=auto'
# alias lsd='ls -Al | grep ^d'
#mount
alias mnt='mount | column -t'
#date
alias now='date +"%F %T %Z"'
#ping
alias ping='ping -c5'
alias fastping='ping -c100 -i.4'
#get web server headers
alias header='curl -I'
#switch to root
alias su='sudo -i'
#colored man page
man() {
        env LESS_TERMCAP_mb=$'\E[01;31m' \
        LESS_TERMCAP_md=$'\E[01;38;5;74m' \
        LESS_TERMCAP_me=$'\E[0m' \
        LESS_TERMCAP_se=$'\E[0m' \
        LESS_TERMCAP_so=$'\E[38;5;246m' \
        LESS_TERMCAP_ue=$'\E[0m' \
        LESS_TERMCAP_us=$'\E[04;38;5;146m' \
        man "$@"
}

lsd() {
	ls -Al $1 | grep ^d
}

#echo -ne "Hello, ${LIGHTCYAN}$USER${NC}. today is "
#echo -e ${LIGHTYELLOW} `date +"%F %T %Z"`
#echo -ne "${LIGHTGRAY}Sysinfo:";uptime ;
#echo -ne "${NC}";

#PS1="\[\033[38;5;10m\][\[$(tput sgr0)\]\[\033[38;5;14m\]\u\[$(tput sgr0)\]\[\033[38;5;196m\]@\[$(tput sgr0)\]\[\033[38;5;14m\]\h\[$(tput sgr0)\]\[\033[38;5;10m\]:\[$(tput sgr0)\]\[\033[38;5;13m\]\W\[$(tput sgr0)\]\[\033[38;5;10m\]]\[$(tput sgr0)\]\[\033[38;5;196m\]\\$\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"
# PS1="\[\033[38;5;10m\][\[${NC}\]\[\033[38;5;14m\]\u\[${NC}\]\[\033[38;5;196m\]@\[${NC}\]\[\033[38;5;14m\]\h\[${NC}\]\[\033[38;5;10m\]:\[${NC}\]\[\033[38;5;13m\]\W\[${NC}\]\[\033[38;5;10m\]]\[${NC}\]\[\033[38;5;196m\]\\$\[${NC}\]\[\033[38;5;15m\] \[${NC}\]"
